Skip to content

feat: implement syntax highlighting for .jref files#13

Merged
ntoulasm merged 3 commits into
mainfrom
feat-enable-syntax-highlighting
Mar 4, 2026
Merged

feat: implement syntax highlighting for .jref files#13
ntoulasm merged 3 commits into
mainfrom
feat-enable-syntax-highlighting

Conversation

@ntoulasm

@ntoulasm ntoulasm commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Summary

This PR introduces a Semantic Tokens Provider to enhance the visual clarity of .jref files. The handler uses the SymbolTable infrastructure to extract ref nodes, and colors pointers independently of the standard JSON TM grammar.

Key Changes

  1. Updated /package.json to add grammar contribution.
  2. Added /syntaxes/jref.tmlanguage.json that just includes the json grammar.
  3. Updated server.ts contributions and registered the semantic token handler .
  4. Implemented semanticTokens.ts to provide token highlight for reference values.
  5. Moved ServerContext interface to util.ts since now it is also used by the semantic tokens handler.

ntoulasm added 3 commits March 4, 2026 09:58
- Added grammar contribution to client package.json
- Configured `source.jref` to inherit from `source.json` to mimic JSON syntax highlights
- Now ref values are highlighted as functions
@ntoulasm ntoulasm self-assigned this Mar 4, 2026
@ntoulasm ntoulasm merged commit b731df7 into main Mar 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant